
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	double num = Math.random();
%>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery-2.1.0.js"></script>
<script>

/*	$(function () {
		$.post("${pageContext.request.contextPath}/product?param=first",function (data) {
			var $div=$("#nav_bar_container");
			var $ul=$("<ul></ul>");
			$div.append($ul);
			for (var i = 0; i <data.list.length ; i++) {
				var $li=$("<li><a href=''>"+data.list[i].name+"</a></li>")
			}

		},"json");
	})*/

</script>
<div id="header">
	<div class="login_menu">
		<div class="login_container">
			<c:set value="${sessionScope.user }" var="user"></c:set>
			<ul class="m_left">
				<c:choose>
					<c:when test="${sessionScope.user!=null}">
						<li><a href="#" class="c_red">${sessionScope.user.uname}</a>&nbsp;&nbsp;&nbsp;</li>
					</c:when>
					<c:otherwise>
						<li><a href="login.jsp" class="c_red">请登录</a>&nbsp;&nbsp;&nbsp;</li>
					</c:otherwise>
				</c:choose>
				<li><a href="register.jsp">请注册</a></li>
			</ul>

			<ul class="m_right">
				<li><img src="images/icon_3.png"><a
					href="javascript:tips()" class="c_red">购物车</a></li>
				<li><img src="images/icon_4.png"><a
					href="javascript:AddFavorite('我的网站',location.href)">收藏</a></li>
				<li><img src="images/icon_2.png"><a href="${pageContext.request.contextPath}/guestbook.jsp">留言</a></li>
				<li><img src="images/icon_1.png"><a href="${pageContext.request.contextPath}/news?param=showall">首页</a></li>
			</ul>
		</div>
	</div>
	<div class="logo_search">
		<div class="logo">
			<img src="images/LOGO.png">
		</div>
		<div class="search">
			<input type="text" placeholder="输入宝贝" id="qname" />
			<button class="query_button" onclick="">搜索</button>
		</div>
	</div>
	<div class="nav_bar">
		<div class="nav_bar_container">
			<ul>
                        <li><a href="#">图音</a></li>
                        <li><a href="#">百货</a></li>
                        <li><a href="#">团购</a></li>
                        <li><a href="#">品牌</a></li>
                    </ul>
		</div>
	</div>
</div>
